package com.example.demo.entity;

import lombok.Data;
import lombok.Getter;
//导入了Lombok的依赖
@Getter

public enum ResultCodeEnum {
    RC200(200, "操作成功"),
    RC500(500, "操作失败");

    // 自定义状态码
    private  int code;

    // 自定义描述
    private  String msg;


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    ResultCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }


//    SUCCESS(true, 200, "成功"),
//    UNKNOWN_REASON(false, 20001, "未知错误"),
//    BAD_SQL_GRAMMAR(false, 21001, "sql语法错误"),
//    JSON_PARSE_ERROR(false, 21002, "json解析异常"),
//    PARAM_ERROR(false, 21003, "参数不正确"),
//    FILE_UPLOAD_ERROR(false, 21004, "文件上传错误"),
//    EXCEL_DATA_IMPORT_ERROR(false, 21005, "Excel数据导入错误");
//
//    private boolean success;
//    private Integer code;
//    private String message;
//    private Object data;
//
//
//    private ResultCodeEnum(Boolean success, Integer code, String message) {
//        this.success = success;
//        this.code = code;
//        this.message = message;
//    }
}
